#include <iostream>
#include "Calculator/Calculator.h"

int main() {
    Calculator calc;
    std::string expression;

    std::cout << "Input expression: ";
    while (true) {
        std::getline(std::cin, expression);
        double result = calc.evaluate(expression);
        ErrorInfo errorInfo = calc.getErrorInfo();
        if (errorInfo.errorType == CalculatorError::None)
        {
            std::cout << "ret: " << result << std::endl;
        } else {
            std::cerr << "err: " << errorInfo.message << std::endl;
        }
    }

    return 0;
}


